package com.ttfeed.server.common.exception;

import com.ttfeed.server.common.enums.ResultEnum;
import lombok.Getter;

/**
 * @author luoxuan
 */
@Getter
public class BadRequestException extends RuntimeException{

    private static final long serialVersionUID = 8852985108474628280L;

    private Integer status = 500;

    public BadRequestException(String msg){
        super(msg);
    }

    public BadRequestException(ResultEnum resultEnum) {
        super(resultEnum.getMessage());
        this.status = resultEnum.getCode();
    }

    public BadRequestException(Integer status, String msg){
        super(msg);
        this.status = status;
    }
}
